package com.sm.auth.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.List;

@Data   //提供了set/get方法
@TableName("ums_sys_user")
public class UmsSysUser implements Serializable {
    @TableId(type = IdType.AUTO)   //id为主键，自动增长，不需要给值
    private Long id;
    private String username;
    private String nickname;
    private String email;
    private String mobile;
    private Integer sex;
    private String avatar;
    private String password;
    private Integer status;
    private String creator;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    private String updater;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
    private String remark;
    @TableLogic     //逻辑删除   只做状态值得改变 MyBatis-Plus默认0是未删除，1是已删除
    private Integer deleted;
    @TableField(exist = false)  //声明表中没有roleList字段
    private List<UmsRole> roleList;
    @TableField(exist = false)
    private List<String> permissionList;
}
